package com.jsb.laundry.service.impl;

import com.jsb.laundry.dao.DriverDao;
import com.jsb.laundry.model.entity.FactoryList;
import com.jsb.laundry.model.vo.DeliveryListVo;
import com.jsb.laundry.model.vo.FactoryListVo;
import com.jsb.laundry.model.vo.ListVo;
import com.jsb.laundry.model.vo.WaybillListVo;
import com.jsb.laundry.service.DriverService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class DriverServiceImpl implements DriverService {
    @Resource
    private DriverDao driverDao;

    /**
     * 工厂列表
     *
     * @return
     */
    @Override
    public List<FactoryList> findByFactoryList(String driverStatus) {
        return driverDao.findByFactoryList(driverStatus);
    }

    @Override
    public List<FactoryList> findByOkFactory(String driverStatus) {
        return driverDao.findByOkFactory(driverStatus);
    }

    @Override
    public List<FactoryList> findByList(String driverStatus) {
        return driverDao.findByList(driverStatus);
    }

    /**
     * 查询用户是否是司机
     *
     * @param userId
     * @return
     */
    @Override
    public String findByDriverStatus(String userId) {
        return driverDao.findByDriverStatus(userId);
    }

    /**
     * 工厂列表
     *
     * @return
     */
    @Override
    public List<FactoryListVo> factoryList() {
        return driverDao.factoryList();
    }

    /**
     * 运单列表
     *
     * @param shopsId
     * @return
     */
    @Override
    public List<WaybillListVo> waybillList(String shopsId,String driverStatus) {
        return driverDao.waybillList(shopsId,driverStatus);
    }

    /**
     * 更新检查状态
     *
     * @param orderItemId
     * @return
     */
    @Override
    public int checkStatus(String orderItemId,String driverStatus) {
        return driverDao.checkStatus(orderItemId,driverStatus);
    }

    @Override
    public WaybillListVo queryOrderInformation(String orderItemId,String driverStatus) {
        return driverDao.queryOrderInformation(orderItemId,driverStatus);
    }

    @Override
    public FactoryList findByFactory(String shopsId,String driverStatus) {
        return driverDao.findByFactory(shopsId,driverStatus);
    }

    @Override
    public FactoryList findByFactoryOk(String shopsId, String driverStatus) {
        return driverDao.findByFactoryOk(shopsId,driverStatus);
    }

    @Override
    public List<WaybillListVo> orderList(String shopsId, String driverStatus) {
        return driverDao.orderList(shopsId,driverStatus);
    }

    @Override
    public int updExceptionStatus(String orderItemId) {
        return driverDao.updExceptionStatus(orderItemId);
    }

    @Override
    public int addException(String orderFulfillmentsId,String orderDirection,String orderItemId) {
        return driverDao.addException(orderFulfillmentsId,orderDirection,orderItemId);
    }

    @Override
    public List<WaybillListVo> exceptionList(String shopsId) {
        return driverDao.exceptionList(shopsId);
    }

    @Override
    public List<WaybillListVo> findByOk(String driverStatus) {
        return driverDao.findByOk(driverStatus);
    }

    @Override
    public String findByDirection(String orderFulfillmentsId) {
        return driverDao.findByDirection(orderFulfillmentsId);
    }

    @Override
    public int updateOrderStatus(List orderId,String driverStatus) {
        return driverDao.updateOrderStatus(orderId,driverStatus);
    }

    @Override
    public  List<String> findByOrderId(List orderFulfillmentsId) {
        return driverDao.findByOrderId(orderFulfillmentsId);
    }



    @Override
    public int shopOrdersItemStatus(List subOrderIdList) {
        return driverDao.shopOrdersItemStatus(subOrderIdList);
    }

    @Override
    public int driverOrdersItemStatus(List subOrderIdList, String driverStatus,String orderDirection) {
        return driverDao.driverOrdersItemStatus(subOrderIdList,driverStatus,orderDirection);
    }

    @Override
    public int factoryOrdersStatus(List orderId) {
        return driverDao.factoryOrdersStatus(orderId);
    }

    @Override
    public int updException(String img, String problem,String orderItemId) {
        return driverDao.updException(img,problem,orderItemId);
    }

    @Override
    public int rExceptionData(String orderItemId) {
        return driverDao.rExceptionData(orderItemId);
    }

    @Override
    public List<String>  findByDirectionList(List list) {
        return driverDao.findByDirectionList(list);
    }

    @Override
    public List<ListVo> productsScanned(String driverStatus ,String shopsId) {
        return driverDao.productsScanned(driverStatus,shopsId);
    }

    @Override
    public String findByOrderItemId(String orderFulfillmentsId) {
        return driverDao.findByOrderItemId(orderFulfillmentsId);
    }

    @Override
    public String findByOrderIdItme(String orderItemId) {
        return driverDao.findByOrderIdItme(orderItemId);
    }

    @Override
    public String findByDirectionOrderId(String orderId) {
        return driverDao.findByDirectionOrderId(orderId);
    }

    @Override
    public int updateOrder(String orderId) {
        return driverDao.updateOrder(orderId);
    }

    @Override
    public int updateFactory(String orderId) {
        return driverDao.updateFactory(orderId);
    }

    @Override
    public int addOrderDriver(String orderId, String orderItemId, String orderDirection) {
        return driverDao.addOrderDriver(orderId,orderItemId,orderDirection);
    }

    @Override
    public String findByOrderIdStr(String subOrderId) {
        return driverDao.findByOrderIdStr(subOrderId);
    }

    @Override
    public String findByorderItemId(String orderFulfillmentsId) {
        return driverDao.findByorderItemId(orderFulfillmentsId);
    }

    @Override
    public List<DeliveryListVo> deliveryList(String keywords, String startTime, String endTime) {
        return driverDao.deliveryList(keywords,startTime,endTime);
    }

    @Override
    public String findByShopsId(String subOrderId) {
        return driverDao.findByShopsId(subOrderId);
    }

    @Override
    public String findByShopsType(String shopsId) {
        return driverDao.findByShopsType(shopsId);
    }

    @Override
    public String findByOrderFulfillmentsId(String orderItemId) {
        return driverDao.findByOrderFulfillmentsId(orderItemId);
    }

    @Override
    public int updateShopsStatus(List list) {
        return driverDao.updateShopsStatus(list);
    }
}
